
export const PARAMS_PROJECT = [
         {
           type: "input",
           field: "name",
           title: "项目名称",
           value: "",
           props: { placeholder: "请输入项目名称" }
         },
         {
           type: "input",
           field: "receiverPhone",
           title: "联系电话",
           value: "",
           props: { placeholder: "请输入联系电话", maxlength: 11 },
           validate: [
             {
               validator: (rule, val, d) => {
                 val &&
                 !/^1(3[0-9]|4[5,7]|5[0,1,2,3,5,6,7,8,9]|6[2,5,6,7]|7[0,1,7,8]|8[0-9]|9[1,8,9])\d{8}$/.test(
                   val
                 )
                   ? d(true)
                   : d();
               },
               message: "手机格式错误"
             }
           ]
         },
         {
           type: "el-button",
           field: "search",
           props: {
             type: "primary",
             icon: "el-icon-search"
           },
           children: ["搜索"],
           emit: ["click"],
           emitPrefix: "btn-search"
         },
         {
           type: "el-button",
           field: "reset",
           props: {
             type: "primary",
             icon: "el-icon-setting"
           },
           children: ["重置"],
           emit: ["click"],
           emitPrefix: "btn-reset"
         },
         {
           type: "el-button",
           field: "add",
           props: {
             type: "danger",
             icon: "el-icon-plus",
             style: "display:block"
           },
           children: ["新增"],
           emit: ["click"],
           emitPrefix: "btn-add"
         },
         {
           type: "el-button",
           field: "projectDownload",
           props: {
             type: "danger",
             icon: "el-icon-download",
             style: "display:block"
           },
           children: ["下载模版"],
           emit: ["click"],
           emitPrefix: "btn-download"
         },
         {
           type: "el-button",
           field: "projectImport",
           props: {
             type: "danger",
             icon: "el-icon-upload2",
             style: "display:block"
           },
           children: ["导入模版"],
           emit: ["click"],
           emitPrefix: "btn-import"
         },
         {
           type: "el-button",
           field: "projectExport",
           props: {
             type: "danger",
             icon: "el-icon-upload2",
             style: "display:block"
           },
           children: ["导出项目库"],
           emit: ["click"],
           emitPrefix: "btn-export"
         },
         {
           type: "el-button",
           field: "projectDel",
           props: {
             type: "danger",
             icon: "el-icon-delete",
             style: "display:block"
           },
           children: ["批量删除"],
           emit: ["click"],
           emitPrefix: "btn-del-batch"
         }
       ];

export let FORM_PROJECT = [
  {
    type: "input",
    field: "name",
    title: "项目名称",
    value: "",
    props: { type: "text" },
    validate: [{ required: true, message: "请输入项目名称", trigger: "blur" }]
  },
  {
    type: "input",
    field: "receiverName",
    title: "项目联系人",
    value: "",
    props: { type: "text" },
    validate: [{ required: true, message: "请输入项目联系人", trigger: "blur" }]
  },
  {
    type: "input",
    field: "receiverPhone",
    title: "联系电话",
    value: "",
    props: { type: "text", maxlength: 11 },
    validate: [
      { required: true, message: "请输入联系电话", trigger: "blur" },
      {
        validator: (rule, val, d) => {
          val &&
          !/^1(3[0-9]|4[0-9]|5[0-9]|6[0-9]|7[0-9]|8[0-9]|9[0-9])\d{8}$/.test(
            val
          )
            ? d(true)
            : d();
        },
        message: "手机格式错误"
      }
    ]
  },
  {
    type: "input",
    field: "address",
    title: "项目地点",
    value: "",
    props: { type: "textarea" },
    validate: [{ required: true, message: "请输入项目地点", trigger: "blur" }]
  },
  {
    type: "input",
    field: "remarks",
    title: "备注",
    value: "",
    props: { type: "textarea" }
  }
];

export const LABEL_PROJECT = [
  {
    label: "创建时间",
    prop: "createTime",
    width: "150",
    type: "createTime"
  },
  { label: "", prop: "", width: "40", type: "checkbox" },
  { label: "项目名称", prop: "name", width: "180", type: "normal" },
  {
    label: "项目联系人",
    prop: "receiverName",
    width: "100",
    type: "normal"
  },
  {
    label: "联系电话",
    prop: "receiverPhone",
    width: "180",
    type: "normal"
  },
  { label: "项目地点", prop: "address", width: "200", type: "normal" },
  { label: "备注", prop: "remarks", width: "200", type: "normal" },
  {
    label: "创建人",
    prop: "createUserName",
    width: "120",
    type: "normal"
  },
  {
    label: "更新时间",
    prop: "updateTime",
    width: "150",
    type: "updateTime"
  }
];

  


  export const OPTION_INLINE = {
    form: { labelWidth: "" ,inline: true,size:"small"},
    resetBtn: false,
    submitBtn: false
  }
  export const OPTION_BLOCK= {
    form: { labelWidth: "" ,size:"small"},
    row:{gutter: 20},
    resetBtn: false,
    submitBtn: false
  }
 



